package es.udc.emarketapp.emarket.model.shippingFacade.actions;

import java.sql.Connection;

import es.udc.fbellas.j2ee.util.exceptions.InternalErrorException;
import es.udc.fbellas.j2ee.util.sql.TransactionalPlainAction;
import es.udc.emarketapp.emarket.model.shipping.dao.SQLShippingDAO;
import es.udc.emarketapp.emarket.model.shipping.dao.SQLShippingDAOFactory;
import es.udc.fbellas.j2ee.util.exceptions.InstanceNotFoundException;

public class DeleteShippingCountryAction implements TransactionalPlainAction {

    private String idSeller;
    private String idCountry;

    public DeleteShippingCountryAction(String idSeller, String idCountry) {
        this.idSeller = idSeller;
        this.idCountry = idCountry;
    }
    
    public Object execute(Connection connection) 
        throws InternalErrorException, InstanceNotFoundException {

        SQLShippingDAO shippingDAO = SQLShippingDAOFactory.getDAO();

         System.out.println("DeleteShippingCountryAction idSeller: " + idSeller + "idCountry: " + idCountry);

        shippingDAO.remove(connection, idSeller, idCountry);

       

        return null;

    }


}
